/**
 * Created by wxl on 2016/12/19.
 */
import * as types from './types'
var api=require("../api/tool.js")

//export  const getCover= (pid) =>{
//    return {
//        type:types.GET_COVER,
//        pid:pid,
//        promoise:api.getSourceData("api/getCovers?pid="+pid+"&n=1&s=0")
//    }
//}



export  const getPidInfo= (pid) =>{
    //console.log("action==>list==>line18====>"+pid)
    return {
        type:types.GET_PIDINFO,
        pid:pid,
        promise: api.getSourceData("api/getPidInfo/"+pid)
    }
}

export const getPidHotData=(pid)=>{
    return {
        type:types.GET_PIDHOTDATA,
        pid:pid,
        promise: api.getSourceData("api/getPidTitles/"+pid+"/hot/8/0")
    }
}


export const getPidWraplistData=(pid,start)=>{//wraplistData里显示的内容
    return {
        type:types.GET_PIDWARPLISTDATA,
        pid:pid,
        start:start,
        promise: api.getSourceData("api/getCovers?pid="+pid+"&n=3&s="+start)
    }
}

export const getPidPlistData=(pid,start)=>{
     return {
         type:types.GET_PIDPLISTDATA,
         pid:pid,
         start:start,
         promise:api.getSourceData("api/getPidCovers/"+pid+"/2/"+start)
     }
}
